1. Field of the Invention
The present invention relates to a system, method, and program for allocating processor resources to a first and second types of tasks.
2. Description of the Related Art
High end storage controllers, such as the International Business Machines Corporation (IBM) Enterprise Storage Server** (ESS), manage Input/Output (I/O) requests from networked hosts to one or more storage devices, such as a direct access storage device (DASD), Redundant Array of Independent Disks (RAID Array), and Just a Bunch of Disks (JBOD). Storage controllers include one or more host bus adaptor (HBA) cards to communicate with one or more hosts over a network and adaptors to communicate with the storage devices.
The IBM ESS storage controllers are designed to allow a general purpose operating system to run along with a special purpose, lightweight operating system to handle the I/O requests from the host channels. This arrangement is especially advantageous because now general purpose user programs, such as web servers, databases, and other application programs, may run on the storage controller that is concurrently managing I/O requests directed to attached storage devices.
FIG. 1 illustrates an architecture of the prior art ESS storage controller 2 for managing I/Os from hosts to a storage device 4 (e.g., a DASD, JBOD, RAID array, etc.) and the execution of user applications, e.g., database programs, web servers, etc. The storage controller 2 includes four central processing units (CPUs) 6a, b, c, d and a general purpose operating system 8, such as AIX, UNIX OS/390, etc. The operating system 8 includes a task dispatcher 10 that assigns CPUs 6a, b, c, d to execute either a general purpose operating system process or a special purpose I/O operating system process. The I/O operating system process is a special purpose, lightweight operating system designed specifically to execute I/O tasks 14a, b, c in a task pool 16 that are directed to the storage device 4. In current implementations, the task dispatcher 10 will allocate three of the CPUs 6a, b, c to execute the I/O operating system to handle I/O related tasks. To ensure that the three CPUs 6a, b, c remain dedicated to I/O related tasks, the task dispatcher 10 will dispatch kernel I/O operating system processes that will execute the I/O tasks 14a, b, c. Because a general application related task will never have higher priority than a kernel process, those CPUs processing I/O tasks 14a, b, c in kernel mode cannot be reassigned to handle lower priority application tasks 14d. 
In prior art implementations, the task dispatcher 10 has only one CPU 14d operating in shared mode. In shared mode, the task dispatcher 10 dispatches application tasks in the task pool 16 to the CPU 6d, running the operating system process 12d, for a period of time or until there are no more application tasks to dispatch. After the period of time, the task dispatcher 10 then alternates to dispatching I/O tasks to the shared CPU 6d, to have the shared CPU 6d execute the I/O operating system process to execute I/O tasks 14a, b, c for another period of time. If the shared CPU 6d completes execution of application tasks 14d prior to the period of time, then an alarm thread assigned the lowest possible priority would be executed to cause a context switch where the task dispatcher 10 will begin dispatching I/O requests in kernel mode to the shared CPU 6d. 
With the prior art technique of task management, the IBM ESS storage controller favors I/O operations directed to the storage device 4 because such I/O operations are often critical. This leaves just one CPU 6d to execute application tasks 14d on a shared basis. This technique has the advantage of always providing some level of resources for both I/O tasks 14a, b, c and application tasks 14d in the task pool 16, although favoring the I/O tasks 14a, b, c. 
There is a continued need in the art to provide improved task management techniques to optimize the allocation of CPU resources to handle I/O tasks and general application program related tasks in order to maximize overall system performance.